﻿<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Class="UserInterface.ProductList"
    Loaded="Window_Loaded"
    x:Name="Window"
    mc:Ignorable="d"
    Title="Product List"
	Width="640" Height="480"  
    Background="#F8F8F8"
    FontFamily="Segoe UI">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="55"/>
            <RowDefinition Height="90"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>

        <Label Grid.Row="0" FontFamily="Segoe" FontWeight="Bold" FontSize="42" Foreground="#555" Margin="10,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="Adventure Works" />

        <GroupBox Margin="10,8,10,0" Grid.Row="1" Header="Search Product">
            <Grid>
                <Label Content="Product Name" Foreground="#FF555555" Width="109.02" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,29,0,0" VerticalAlignment="Top" d:LayoutOverrides="GridBox" />
                <Label Content="Product Category" Foreground="#FF555555" Width="109.02" d:LayoutOverrides="Height, GridBox" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,0.08,0,21" />
                <ComboBox  x:Name="CategoryComboBox"  SelectionChanged="CategoryComboBox_SelectionChanged" DisplayMemberPath="Name" TabIndex="1" d:LayoutOverrides="VerticalAlignment, Height, GridBox" Margin="153,4.08,285,31" />
                <TextBox Text="" TextWrapping="Wrap" x:Name="NameTextBox" TabIndex="2" Margin="153,31,285,3" d:LayoutOverrides="VerticalAlignment, GridBox" />
                <Button Content="Search" Width="80" Click="btnSearch_Click"  TabIndex="3" d:LayoutOverrides="VerticalAlignment, Width, Height, GridBox" HorizontalAlignment="Right" Margin="0,0,199,5" VerticalAlignment="Bottom" Height="20"/>

            </Grid>
        </GroupBox>




        <ListView x:Name="ProductsListView" Grid.Row="2"  Margin="10,12,10,8" Width="Auto" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Product Number" DisplayMemberBinding="{Binding Path=ProductNumber}" />
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}"/>
                    <GridViewColumn Header="Category" DisplayMemberBinding="{Binding Path=ProductCategory.Name}"/>
                    <GridViewColumn Header="ListPrice" DisplayMemberBinding="{Binding Path=ListPrice}"/>
                    <GridViewColumn Header="Color" DisplayMemberBinding="{Binding Path=Color}"/>
                    <GridViewColumn Header="Size" DisplayMemberBinding="{Binding Path=Size}"/>
                    <GridViewColumn Header="Weight" DisplayMemberBinding="{Binding Path=Weight}"/>
                </GridView>
            </ListView.View>
        </ListView>

        <Button Grid.Row="3" HorizontalAlignment="Right" Margin="0,0,120,8" x:Name="btnNewProduct" Click="btnNewProduct_Click" VerticalAlignment="Bottom" d:LayoutOverrides="Height" Width="100" Content="New Product"/>
        <Button HorizontalAlignment="Right" Margin="0,0,10,8" x:Name="btnDeleteProduct" Width="100" Grid.Row="3" Click="btnDeleteProduct_Click" VerticalAlignment="Bottom" Content="Delete Product"/>

    </Grid>
</Window>
